﻿using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Rison.DataAccess.Common;
using Rison.DBHelper;


namespace Rison.DataAccess.Data.ZP
{
    public sealed class HistoryExamDB : DataAccessBase
    {
        protected override string tableName
        {
            get { return "Hist_Depart_Examination"; }
        }

        public int InsertSubInfobyParentId(string field, string Param)
        {
            StringBuilder sql = new StringBuilder();
            sql.AppendFormat("insert into {0} ({1}) values ({2})", tableName, field,Param);

            return base.ExecuteNonSql(sql.ToString());
        }

        public DataSet GetInformation(string departid, string year)
        {
            StringBuilder sql = new StringBuilder();
            sql.AppendFormat("select * from {0} where departid ='{1}' and year='{2}' order by modifiedDate desc", tableName, departid, year);

            return base.ExecuteSql(sql.ToString(), "GetInformation");
        }
    }

   
}
